package gcb.metalsys.enums;

import gcb.metalsys.base.ResultUtil;
import gcb.metalsys.base.dto.ResultDTO;
import lombok.Getter;

/**
 * @author ReMidDream
 * @date 2018/10/23 20:55
 **/
@Getter
public enum ProductEnum {

    OPEN(1,"销售中"),
    END(-1,"销售结束"),
    WAIT(0,"销售未开始")
    ;

    private Integer code;

    private String message;

    ProductEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResultDTO show() {
        return ResultUtil.Error(this.code.toString(),this.message);
    }
}
